﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BE
{
	public class ShoppingCart
	{
        public List<Album> Cart { get; set; }
        private static ShoppingCart instance;

        private ShoppingCart() 
        {
            this.Cart = new List<Album>();
        }

        public static ShoppingCart Instance
        {
            get 
            {
                if (instance == null)
                {
                    instance = new ShoppingCart();
                }
                return instance;
            }
        }
        
        public void addItem(Album a)
        {
            Cart.Add(a);
        }

        public void removeItem(int id)
        {
            Cart.RemoveAt(id);
        }

        public void ClearCart()
        {
            Cart.Clear();
        }
	}
}
